import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

public class JedisConnectionFactory {
    private static final JedisPool jedispool;

    static {
        JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
        jedisPoolConfig.setMaxTotal(8);

        jedispool = new JedisPool(jedisPoolConfig, "101.42.239.193", 6379, 1000, "ys199639");
    }

    public static Jedis getjedis(){
        return jedispool.getResource();
    }
}
